package com.mindskip.xzs.viewmodel.admin.question;

import org.apache.commons.lang3.StringUtils;

/**
 * @author changjiang
 * @Title:
 * @Package
 * @Description: excel导入
 * @date 2022/3/58:47 下午
 */

public class QuestionExcelRequest {
    /**
     * 题型
     */
    private String questionTypeStr;
    /**
     * 学科
     */
    private String subject;
    /**
     * 知识点
     */
    private String gradeLevelStr;
    /**
     * 题干
     */
    private String title;
    /**
     * 选项 A
     */
    private String contentA;
    /**
     * 选项 B
     */
    private String contentB;
    /**
     * 选项 C
     */
    private String contentC;
    /**
     * 选项 D
     */
    private String contentD;
    /**
     * 选项 E
     */
    private String contentE;
    /**
     * 选项 F
     */
    private String contentF;
    /**
     * 选项 G
     */
    private String contentG;
    /**
     * 选项 H
     */
    private String contentH;
    /**
     * 解析
     */
    private String analyze;
    /**
     * 分数
     */
    private String score;
    /**
     * 难度
     */
    private Integer difficult;

    /**
     * 答案
     */
    private String correct;

    public String getQuestionTypeStr() {
        return questionTypeStr;
    }

    public void setQuestionTypeStr(String questionTypeStr) {
        this.questionTypeStr = questionTypeStr;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getGradeLevelStr() {
        return gradeLevelStr;
    }

    public void setGradeLevelStr(String gradeLevelStr) {
        this.gradeLevelStr = gradeLevelStr;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContentA() {
        return contentA;
    }

    public void setContentA(String contentA) {
        this.contentA = contentA;
    }

    public String getContentB() {
        return contentB;
    }

    public void setContentB(String contentB) {
        this.contentB = contentB;
    }

    public String getContentC() {
        return contentC;
    }

    public void setContentC(String contentC) {
        this.contentC = contentC;
    }

    public String getContentD() {
        return contentD;
    }

    public void setContentD(String contentD) {
        this.contentD = contentD;
    }

    public String getContentE() {
        return contentE;
    }

    public void setContentE(String contentE) {
        this.contentE = contentE;
    }

    public String getContentF() {
        return contentF;
    }

    public void setContentF(String contentF) {
        this.contentF = contentF;
    }

    public String getContentG() {
        return contentG;
    }

    public void setContentG(String contentG) {
        this.contentG = contentG;
    }

    public String getContentH() {
        return contentH;
    }

    public void setContentH(String contentH) {
        this.contentH = contentH;
    }

    public String getAnalyze() {
        return analyze;
    }

    public void setAnalyze(String analyze) {
        this.analyze = analyze;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public Integer getDifficult() {
        return difficult;
    }

    public void setDifficult(Integer difficult) {
        this.difficult = difficult;
    }

    public String getCorrect() {
        return correct;
    }

    public void setCorrect(String correct) {
        this.correct = correct;
    }

    public Integer getQuestionType(String questionTypeStr) {
        int type = 0;
        if (StringUtils.isNotEmpty(questionTypeStr)) {
            if (questionTypeStr.equals("单选题")) {
                type = 1;
            }
            if (questionTypeStr.equals("多选题")) {
                type = 2;
            }
            if (questionTypeStr.equals("判断题")) {
                type = 3;
            }
        }
        return type;
    }

    public Integer getSubjectId(String subject) {
        int type = 2;
        if (StringUtils.isNotEmpty(subject)) {
            if (subject.contains("健身")) {
                type = 2;
            }
            if (subject.contains("保安")) {
                type = 3;
            }
        }
        return type;
    }
}
